1. Field of the Invention
The present invention generally relates to a method and an apparatus for memory management, and in particular, to a management method, a management apparatus, and a controller for memory data access.
2. Description of Related Art
Along with the widespread of digital cameras, camera phones, and MP3 in recently years, the consumers' demand to storage media has increased drastically too. Flash memory is one of the most adaptable memories for such battery-powered portable products due to its characteristics such as data non-volatility, low power consumption, small volume, and non-mechanical structure. Besides, flash memory is also broadly applied to external products such as flash cards and flash drives. Thereby, flash memory has become one of the most focused electronic products in recent years.
Flash memories can be categorized into single level cell (SLC) NAND flash memories and multi level cell (MLC) NAND flash memories according to the type of the memory cells thereof. A flash memory is usually divided into a plurality of physical blocks, which will be referred to as blocks thereinafter for the convenience of description. Generally speaking, a flash memory is erased in unit of blocks, namely, each block contains the smallest number of memory cells which are erased together. Each block is usually divided into a plurality of pages. The page is usually the smallest unit for program the flash memory, namely, page is the smallest unit for writing or reading data. However, it has to be noted that the smallest programming unit may also be a sector in another flash memory design, such as a SLC NAND flash memory using the number of program (NOP) as 4.
However, because data is written into a flash memory in unit of pages or sectors, at least a page or a sector has to be programmed whenever a data is written into the flash memory regardless of the quantity of the data. Besides, an erasing operation has to be performed on the flash memory (in unit of blocks) in order to update the data previously recorded therein. Such frequent writing and erasing operations will shorten the lifespan of the flash memory and reduce the efficiency in data transmission.